FROM centos:7
MAINTAINER zly<zhongliuyang@qq.com>
RUN yum -y cluster wget && mkdir /data
WORKDIR /data
RUN wget https://repo.huaweicloud.com/openjdk/17/openjdk-17_linux-x64_bin.tar.gz && tar -zxvf openjdk-17_linux-x64_bin.tar.gz && mv jdk-17  /usr/local/java &&  wget https://download.fastmirror.net/download/Paper/1.18.2/build388 -O server.jar
ENV JAVA_HOME /usr/local/java
ENV PATH $JAVA_HOME/bin:$PATH
RUN rm -rf openjdk-17_linux-x64_bin.tar.gz
EXPOSE 25565
VOLUME /data
RUN java -jar server.jar && echo "eula=true"  > eula.txt
ENTRYPOINT ["java","-jar","-Xmx1G","-Xms1G","server.jar"]
